﻿@if (false)
{
    // Just use this script to enable jQuery intellisense in Visual Studio. Never render to real HTML.
    <script src="/Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}
@using System.Web.Mvc
@using System.Web.Mvc.Html
@using ORM.Common
@using ORM.Common.Helpers
@using ORM.Helpers
@using ORM.Models
@using ORM.Resources
@using Telerik.Web.Mvc.UI
@model ORM.ViewModels.Account.ListUserViewModel
@{
    ViewBag.Title = "Thành Viên";
}
<table class="contentBox" width="100%">
    <tr>
        <th class="boxTitle">
            Thành Viên
        </th>
    </tr>
    <tr>
        <td style="vertical-align: top; padding-top: 10px">
            <table width="100%">
                <tr>
                    <td>
                        <div>
                            Tổng số: @Model.Users.Count thành viên
                        </div>
                    </td>
                    <td style="float: right">
                         @Html.ValidationSummary(true, ValidationMessages.Summary)
            @using (Html.BeginForm("GetAllUser", "Account", FormMethod.Get))
            {
                <div>
                    @Html.ValidationMessageFor(m => m.UsernameSearch)
                </div>        
                @Html.TextBoxFor(m => m.UsernameSearch, new { name = "usernameSearch", @style = "border: solid 1px #104E8B;-moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px" })<input class="colorSearchButton" type="submit" style="height: 26px; width: 85px;" value="Tìm Kiếm"/>
   
            }
                    </td>
                </tr>
            </table>
           
            <div style="display: block">
                @for (var i = 0; i < Model.Users.Count; i = i + 3)
                {
                    <table>
                        <tr>
                            @for (var j = i; j < i + 3; j++)
                            {
                                if (j == Model.Users.Count)
                                {
                                    break;
                                }
                                var item = Model.Users[j];

                                <td>
                                    <table style="width: 300px; height: 50px; border: solid 2px gainsboro">
                                        <colgroup>
                                            <col span="1" style="width: 30%;" />
                                            <col span="1" style="width: 70%;" />
                                        </colgroup>
                                        <tr>
                                            <td>
                                                <a href="@Url.UserLink(item.Id, item.Username)">
                                                    <img src="@Url.UserAvatar(item, ImageType.Big)" alt="@item.Username.Truncate(10)" height="70px" width="70px" class="small-imgavatar"></a>
                                            </td>
                                            <td>
                                                <table style="height: 50px; width: 130px">
                                                    <tr>
                                                        <td>
                                                            <b><a href="@Url.UserLink(item.Id, item.Username)" class="titleLink">
                                                                @item.Username.Truncate(30)
                                                            </a></b>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            @item.Ponit Điểm
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <br />
                                        </tr>
                                    </table>
                                </td>


                            }
                        </tr>
                    </table>

                }
            </div>
        </td>
    </tr>
</table>
